#!/usr/bin/python3
# -*- encoding=utf-8 -*-

import requests
import login01

if __name__ == '__main__':
    userName = "optadmin"
    password = "Gridview@123"

    headers = {'Gridview-Token': 'OzSBLmLbGPXR0kWccMmFLA==',}
    session = requests.session()

    login = login01.Login(userName,password,headers,session)
    result = login.login()
    print result

    url = 'http://172.99.1.102:6080/resource/getResourceStatistic.action'
    req = session.get(url,headers=headers)
    print (req.text) 
    #res = req.json()
    #for i in res:
    #    print(res[i])

